# set system proxy as default one
# !don't do that if you don't have proxy in port 1080.
# [System.Net.WebRequest]::DefaultWebProxy=(New-Object System.Net.WebProxy "127.0.0.1:1080")
# install scoop
$env:SCOOP='D:\scoop'
[environment]::setEnvironmentVariable('SCOOP',$env:SCOOP,'User')
$env:SCOOP_GLOBAL='D:\ScoopApps'
[environment]::setEnvironmentVariable('SCOOP_GLOBAL',$env:SCOOP_GLOBAL,'Machine')
iex ((New-Object System.Net.WebClient).downloadstring('https://get.scoop.sh'))

## basic
# install lessmsi to avoid errors
scoop install lessmsi
scoop config MSIEXTRACT_USE_LESSMSI true
scoop install 7zip git
scoop install aria2

scoop bucket add extras
scoop bucket add versions
scoop update

## utils
scoop install bandizip
scoop install innounp
scoop install .\scoop_apps\Files2Folder.json
scoop install .\scoop_apps\pixelscheduler.json
scoop install everything
scoop install autohotkey
scoop install keepass syncthing
scoop install xmind8
scoop install pandoc
scoop install nircmd


## editor
scoop install vscode
scoop install typora

## program
# languages
scoop install python nodejs go
# program utils
scoop install cmake openssl
scoop install openssh

## media
scoop install honeyview
scoop install format-factory
scoop install firefox

# 不安装portable 版本，所以不使用scoop安装。
# scoop install sumatrapdf freedownloadmanager

## console
scoop install concfg

## download tools
scoop install pandownload
scoop install filezilla winscp

## safe
# scoop install ccleaner

# after install concfg
concfg export console-backup.json
concfg import solarized-dark -y -n

## basicly python use venv
pip install virtualenv


## install keepass-http
(new-object System.Net.WebClient).DownloadFile('https://github.com/pfn/keepasshttp/archive/1.8.4.2.zip', 'keepass_http.zip')
Expand-Archive -Path keepass_http.zip -DestinationPath $env:SCOOP\apps\keepass\current\Plugins
Remove-Item -path keepass_http.zip

# Other install method
# (new-object System.Net.WebClient).DownloadFile('https://raw.github.com/pfn/keepasshttp/master/KeePassHttp.plgx', 'KeePassHttp.plgx')
# Move-Item KeePassHttp.plgx $env:SCOOP\apps\keepass\current\Plugins


## install chinese language support for keepass
(new-object System.Net.WebClient).DownloadFile('https://downloads.sourceforge.net/keepass/KeePass-2.44-Chinese_Simplified.zip', 'Chinese.zip')
Expand-Archive -Path Chinese.zip -DestinationPath $env:SCOOP\apps\keepass\current\Languages
Remove-Item Chinese.zip
